<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Grima Portal</title>
	<link rel="stylesheet" type="text/css" href="css/themes/bootstrap/easyui.css">
	<link rel="stylesheet" type="text/css" href="css/icon.css">
	<link rel="stylesheet" type="text/css" href="css/portal.css">
	<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
	<link rel="stylesheet" type="text/css" href="css/jquery-colorbox-1.3.9.css">
	
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="js/jquery-colorbox-1.3.13.js"></script>
	
</head>
<body class="easyui-layout">
	
    <div id="header" data-options="region:'north',border:false"></div>
    <div id="menu" data-options="region:'west',split:true,title:' '" style="width:250px;"></div>
    <div data-options="region:'east',split:true,collapsed:true,title:' '" style="width:250px;padding:10px;"></div>
    <div id="footer" data-options="region:'south',border:false"></div>
    <div data-options="region:'center',title:'Parceiros'">
	<table id="dg" class="easyui-datagrid" title=""
			data-options="rownumbers:true,singleSelect:true,url:'partners.json',method:'get',toolbar:'#tb',pagination:true, fitColumns:true,onClickRow: onClickRow">
		<thead>
			<tr>
				<th data-options="field:'id',width:50">Id</th>
				<th data-options="field:'name',width:150">Nome</th>
				<th data-options="field:'type',width:80">Tipo</th>
				<th data-options="field:'contact',width:150">Contato</th>
				<th data-options="field:'phone1',width:80">Telefone</th>
			</tr>
		</thead>
	</table>
	<div id="tb" style="padding:5px;height:auto">
		<div style="margin-bottom:5px">
			<a href="partnerDetails.html" title="Novo" ><i class="fa fa-plus" style="font-size:18px;color:green;padding:5px;"></i>Novo</a>
			<a href="partnerDetails.html" title="Detalhes"><i class="fa fa-list" style="font-size:18px;color:green;padding:5px;"></i>Detalhes</a>
			<a href="partnerDetails.html" title="Editar"><i class="fa fa-edit" style="font-size:18px;color:green;padding:5px;"></i>Editar</a>
			<a href="#" title="Excluir" onclick="confirmDelete();"><i class="fa fa-trash-o" style="font-size:18px;color:green;padding:5px;"></i>Excluir</a>
		</div>
		<br/>
		<div>
			Nome: <input class="easyui-textbox" style="width:80px">
			Tipo: 
			<select class="easyui-combobox" panelHeight="auto" style="width:100px">
				<option value=""></option>
				<option value="cliente">Cliente</option>
				<option value="fornecedor">Fornecedor</option>
				<option value="prospect">Prospect</option>
				<option value="vendedor">Vendedor</option>
			</select>
			<a href="#" class="easyui-linkbutton" iconCls="icon-search">Procurar</a>
		</div>
	</div>
    </div>

	<script>
		function search(){
		}
		function onClickRow(index){
			var row = $('#dg').datagrid('getSelected');
			if (row){
				//$.messager.alert('Info', row.id+":"+row.name);
			}
		}
		function confirmDelete(){
			$.messager.confirm('Aviso', 'Confirma exclusão?', function(r){
				if (r){
					//alert('confirmed: '+r);
				}
			});
		}
	</script>
	
	<script>
		$('#header').load('header.html');
		$('#footer').load('footer.html');
		$('#menu').load('menu.html');
	</script>

</body>
</html>